package com.lashou.chunshen.lashoutuangou.tools;

import android.app.Application;

import com.baidu.mapapi.SDKInitializer;
import com.yolanda.nohttp.Logger;
import com.yolanda.nohttp.NoHttp;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by Administrator on 2016/8/31.
 */

public class AppApplication extends Application{
    private boolean IsDebug = true;// 日志开关
    private static AppApplication mInstance = null;
    private static final String TAG = "JPush";
    @Override
    public void onCreate() {
        super.onCreate();
        mInstance=this;
        //init baidu map
        SDKInitializer.initialize(getApplicationContext());
        // 初始化NoHttp
        NoHttp.initialize(this);
        // 开启调试模式
        Logger.setDebug(true);
        Logger.setTag("NoHttp");


        JPushInterface.setDebugMode(true); 	// 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);     		// 初始化 JPush
    }


    public boolean getIsDebug(){
        return  IsDebug;
    }
    public static AppApplication getInstance() {
        return mInstance;
    }
}
